
Petitpas, A. & Sciarini, P. (2025). The Dynamics of Public Opinion in Direct Democracy Campaigns. British Journal of Political Science.

------------------------------------------------------------
Contents of this replication material
------------------------------------------------------------

- Datasets 
	- panel_ch_june_23.RData (Swiss data)
	- panel_us.RData (California data)
	
- R scripts 
	- function_plot_agr.R
		-> Contains functions used in other scripts to generate plots.
	
	- rcs_climat.R ; rcs_ocde.R ; rcs_prop26.R ; rcs_prop27.R
		-> Data preparation and analysis for each ballot measure.
	
	- rcs_plots.R 
		-> Master script to reproduce all plots presented in the paper and appendices.
	
	- rcs_mediation.R
		-> Master script to reproduce all mediation analysis plots.

------------------------------------------------------------
How to use this material
------------------------------------------------------------

- You do not need to run each ballot-specific script separately.
- Simply run:
  - rcs_plots.R
  - rcs_mediation.R
- Important #1 : since the master scripts call the ballot-specific scripts,
				 all scripts and datasets must be stored in the same directory.
- Important #2 : do not forget to set the "working directory" (setwd) for each script.